﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BuXiaChu.OrderDishes.Model;
using BuXiaChu.OrderDishes.BLL;

namespace BuXiaChu.OrderDishes.Web.Admin.Modules.ShareCode
{
    public partial class ShareCodeList : System.Web.UI.UserControl
    {
        public List<ShareCodeModel> List
        {
            get;
            set;
        }

        public ShareCodeModel ParentShareCode
        {
            get;
            set;
        }

        public ShareCodeClassModel ShareCodeClass
        {
            get;
            set;
        }

        public bool ShowOp
        {
            get;
            set;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            ParentShareCode = new ShareCodeModel();
            ShareCodeClass = new ShareCodeClassModel();
            if (List.Count > 0)
            {
                if (List[0].ParentId > 0)
                {
                    ParentShareCode = ShareCodeManager.GetByShareCodeId(List[0].ParentId);
                }
                ShareCodeClass = ShareCodeManager.GetByShareCodeClassId(List[0].ClassID);
            }
        }
    }
}